#ifndef _MPP_ITC_RGA_H__
#define _MPP_ITC_RGA_H__

#include <dlfcn.h> 
#include <RgaApi.h>
#include <mpp_common.h>
#ifdef __cplusplus
extern "C" {
#endif

typedef int(* FUNC_RGA_INIT)();
typedef void(* FUNC_RGA_DEINIT)();
typedef int(* FUNC_RGA_BLIT)(rga_info_t *, rga_info_t *, rga_info_t *);

typedef struct _rga_context{
    void *rga_handle;
    FUNC_RGA_INIT init_func;
    FUNC_RGA_DEINIT deinit_func;
    FUNC_RGA_BLIT blit_func;
} rga_context;

int RGA_init(rga_context* rga_ctx);

void img_resize_fast(rga_context *rga_ctx, int src_fd, int src_w, int src_h, uint64_t dst_phys, int dst_w, int dst_h);

void img_resize_slow(rga_context *rga_ctx, 
void *src_virt, int src_w, int src_h,FRAME_TYPE src_format,int src_rotation, 
void *dst_virt, int dst_w, int dst_h,FRAME_TYPE dst_format,int dst_rotation);
 //--创建动态链接库的时候必须要引出到H文件，否则dlsym函数会找不到
MPP_IMAGE_PROCESS_T * create_image_process(void);   
void image_process_destroy(MPP_IMAGE_PROCESS_T * dec);

int RGA_deinit(rga_context* rga_ctx);

#ifdef __cplusplus
}
#endif
#endif
